home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / gcl-1.000 / gcl-1 / gcl-1.0 / makefile < prev    next >
Encoding:
Makefile  |  1994-05-10  |  3.8 KB  |  157 lines

  1. #  Compiling gcl
  2. # select a machine-type from ./MACHINES
  3.  
  4. # ./add-defs machine-type
  5. # make
  6.  
  7. # For more details see README
  8.  
  9. PREFIX_DIR=/usr/local
  10. # This would cause make install to create /usr/local/bin/gcl and
  11. # /usr/local/lib/gcl-1-??/* with some basic files.
  12. ##########################
  13.  
  14. # begin makedefs
  15. GCLDIR=/d11/wfs/newakcl
  16. SHELL=/bin/sh
  17. MACHINE=sun4
  18.  
  19. LBINDIR=/usr/local/bin
  20. OFLAG    =  -O
  21. LIBS    = -lm 
  22.  
  23. #include "sparc.h"
  24.  
  25. # the commercial (for money) C compiler has never been able
  26. # to compile akcl/gcl correctly.  Perhaps it does not like the idea
  27. # that this is free software.   However the standard C compiler is ok.
  28.  
  29. CC = cc  -DVOL=  -I$(GCLDIR)/o -Bstatic -temp=. -pipe
  30. CC = cc  -DVOL=  -I$(GCLDIR)/o -Bstatic  -pipe
  31. ODIR_DEBUG=-O4
  32.  
  33. #gcc 2.1 and 2.2 compile gcl correctly as far as I have been able to determine.
  34. #gcc 2.3.3 does not compile gcl correctly
  35. # gcc 2.5.7 is correct as far as I can tell
  36. #CC = gcc -I${GCLDIR}/o -static -DVOL=volatile -W 
  37.  
  38. AS=as -P
  39.  
  40. CFLAGS    = -c $(DEFS)  -I../h
  41.  
  42. MAIN    = ../o/main.o
  43.  
  44. MPFILES=$(MPDIR)/mpi-sparc.o $(MPDIR)/sparcdivul3.o $(MPDIR)/libmport.a
  45. #MPFILES=${MPDIR}/mpi.o ${MPDIR}/libmport.a
  46.  
  47. RSYM    = rsym
  48. SFASL    = $(ODIR)/sfasl.o
  49.  
  50. # This function will be run before dumping.
  51. # When using SFASL it is good to have (si::build-symbol-table)
  52. INITFORM=(si::build-symbol-table)
  53.  
  54.  
  55.  
  56. # Use symbolic links
  57. SYMB=-s
  58. # the  make to use for saved_kcp the profiler.
  59. KCP=kcp-sun
  60.  
  61. NULLFILE = ../h/secondary_sun_magic
  62.  
  63. # end makedefs
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73. BINDIR    = bin
  74. HDIR    = h
  75. CDIR    = c
  76. ODIR    = o
  77. LSPDIR    = lsp
  78. CMPDIR    = cmpnew
  79. PORTDIR    = unixport
  80.  
  81. all:   
  82.     make command
  83.     (cd $(BINDIR); make all)
  84.     (cd mp ; make all)
  85.     -if [ -f o/cmpinclude.h ] ; then true; else ln  h/cmpinclude.h o ; fi
  86.     (cd $(ODIR); make all)
  87.     (cd $(LSPDIR); make all)
  88.     (cd $(CMPDIR); make all)
  89.     (cd $(PORTDIR); make saved_gcl)
  90.     
  91. #     After making successfully send in a notification to
  92. #    gcl@nicolas.ma.utexas.edu.   This is extremely helpful in
  93. #    tracking on which machines and OS versions there are problems.
  94. #    This will be done automatically by the  xbin/notify line.
  95.     (cd  cmpnew ; make collectfn.o)
  96.     @- if  [ -f cmpnew/collectfn.o ]  ; \
  97.     then echo "Make of GCL `cat majvers`.`cat minvers` completed." ; \
  98.     xbin/notify "CC=${CC}" ; \
  99.     else echo "The new image failed to compile collectfn.lsp" ;fi
  100.  
  101.     
  102.  
  103. /usr/include/cmpinclude.h:    $(HDIR)/cmpinclude.h
  104.     @ if [ "$(SU)" != "SKIP" ] ; then echo "su and make cmpinclude.h" ;\
  105.     exit 1 ; \
  106.     else echo "Warning: ask root to cp $(HDIR)/cmpinclude.h /usr/include/cmpinclude.h" \
  107.     ;fi
  108.  
  109. cmpinclude.h:
  110.     cp $(HDIR)/cmpinclude.h /usr/include
  111.  
  112. command:
  113.     rm -f xbin/gcl ; echo "#!/bin/sh" > xbin/gcl; \
  114.     echo "${PWD}/unixport/saved_gcl -dir ${PWD}/unixport/ \$$@ " \
  115.     >> xbin/gcl
  116.     chmod 755 xbin/gcl
  117.  
  118. merge:
  119.     ${CC} -o merge merge.c
  120.  
  121. LISP_LIB=cmpnew/collectfn.o lsp/gprof.* lsp/profile.lsp
  122.  
  123. install: 
  124.     make install1 "INSTALL_LIB_DIR=${PREFIX_DIR}/lib/gcl-`cat majvers`.`cat minvers`" "PREFIX_DIR=${PREFIX_DIR}"
  125. INSTALL_LIB_DIR=
  126. install1:
  127.     -if [ -d ${PREFIX_DIR}/lib ] ;then true; else mkdir ${PREFIX_DIR}/lib ; fi
  128.     -if [ -d ${PREFIX_DIR}/bin ] ;then true; else mkdir ${PREFIX_DIR}/bin ; fi
  129.     -if [ -d ${INSTALL_LIB_DIR} ] ; then true; else mkdir ${INSTALL_LIB_DIR} ;fi 
  130.     (echo      "#!/bin/sh" > ${PREFIX_DIR}/bin/gcl; \
  131.     echo ${INSTALL_LIB_DIR}/unixport/saved_gcl -dir ${INSTALL_LIB_DIR}/unixport/ -libdir ${INSTALL_LIB_DIR}/ >> \
  132.     ${PREFIX_DIR}/bin/gcl)
  133.     chmod a+x ${PREFIX_DIR}/bin/gcl
  134.     tar cvf - unixport/saved_gcl doc/DOC doc/*.el ${LISP_LIB} | \
  135.       (cd ${INSTALL_LIB_DIR} ;tar xvf -)
  136.     -(cd doc ; make install)
  137.  
  138.  
  139. install-elisp-files:
  140.     (cd doc ; make install)
  141.  
  142. clean:
  143.     (cd $(BINDIR); make clean)
  144.     (cd mp ; make clean)
  145.     (cd $(ODIR); make clean)
  146.     (cd $(LSPDIR); make clean)
  147.     (cd $(CMPDIR); make clean)
  148.     (cd $(PORTDIR); make clean)
  149.  
  150. TARFILE=../gcl.tgz
  151. tar:
  152.     xbin/distribute ${TARFILE}
  153.  
  154. kcp:
  155.     (cd go ; make  "CFLAGS = -I../h -pg  -c -g ")
  156.     (cd unixport ; make gcp)
  157.